﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPageMcSigAdmin.master" AutoEventWireup="true"
    CodeFile="OrdenCargueListado.aspx.cs" Inherits="OrdenCargueListado" %>

<%@ Register Src="~/GoogleMapForASPNet.ascx" TagName="GoogleMapForASPNet" TagPrefix="uc1" %>
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>
<%@ Register Assembly="DevExpress.Web.v12.2, Version=12.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v12.2, Version=12.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v12.2, Version=12.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxPopupControl" TagPrefix="dx" %>
<%@ Register assembly="UsrControls" namespace="UsrControls" tagprefix="cc1" %>
<script runat="server">

   
</script>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    +<br />
    -<br />
    <script language="javascript">
        function confirmEditAspx() {
            var counter = ASPxGridViewOrdenSalida.GetSelectedRowCount();

            if (counter > 1) {
                counter = 0;
                alert("Debe seleccionar un solo registro");
                return (false);
            }
            else if (counter == 1) {
                counter = 0;
                return (true);
            }
            else if (counter == 0) {
                counter = 0;
                alert("Debe seleccionar al  menos un registro");
                return (false);
            }
        }
				
    </script>
    <h1 class="presupuesto">
        Orden de Cargue</h1>
    <table style="width: 100%;">
        <tr>
            <td class="instruccion">
                Para agregar o modificar la información de una orden de pago, por favor seleccione
                del grid un registro y a continuación pulse sobre el botón MODIFICAR, para&nbsp;
                agregar una nueva orden seleccion el boton NUEVO.
                </td>
        </tr>
        <tr>
            <td>
                <table>
                    <tr>
                        <td>
                            <dx:ASPxButton ID="btnNuevo" runat="server" Text="NUEVO" Theme="iOS" OnClick="btnNuevo_Click">
                            </dx:ASPxButton>
                        </td>
                        <td>
                            <dx:ASPxButton ID="btnActualizar" runat="server" Text="MODIFICAR" Theme="iOS" OnClick="btnActualizar_Click"
                                ClientInstanceName="btnActualizar">
                                <ClientSideEvents Click="function(s, e) {
	return confirmEditAspx();
}" />
                            </dx:ASPxButton>
                        </td>
                        <td>
                            <dx:ASPxButton ID="btnEliminar" runat="server" Text="ELIMINAR" Theme="iOS" OnClick="btnEliminar_Click"
                                Visible="False">
                            </dx:ASPxButton>
                        </td>
                        <td>
                            <dx:ASPxButton ID="btnRemesa" runat="server" Text="IMPRIMIR ORDEN DESPACHO" Theme="iOS"
                                OnClick="btnRemesa_Click" Width="273px">
                            </dx:ASPxButton>
                        </td>
                        <td>
                            <dx:ASPxButton ID="btnRemesaGM" runat="server" Text="IMPRIMIR ORDEN GM" Theme="iOS"
                                OnClick="btnRemesaGM_Click" Width="204px">
                            </dx:ASPxButton>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>
                <cc1:PopupPanel ID="PopupPanelMapa" runat="server" Height="450px" Width="500px">
                    <table style="width:100%;">
                        <tr>
                            <td>
                                &nbsp;</td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td>
                                <uc1:GoogleMapForASPNet ID="GoogleMapForASPNet1" runat="server" />
                            </td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td align="center">
                                <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Cerrar" />
                            </td>
                            <td>
                                &nbsp;</td>
                        </tr>
                    </table>
                </cc1:PopupPanel>
                <dx:ASPxGridView ID="ASPxGridViewOrdenSalida" runat="server" ClientInstanceName="ASPxGridViewOrdenSalida"
                    AutoGenerateColumns="False" KeyFieldName="AOS_ID" Width="100%" EnableTheming="True"
                    Theme="PlasticBlue" OnRowCommand="ASPxGridViewOrdenSalida_RowCommand">
                    <Columns>
                        <dx:GridViewCommandColumn ShowSelectCheckbox="True" VisibleIndex="0">
                            <ClearFilterButton Visible="True">
                            </ClearFilterButton>
                        </dx:GridViewCommandColumn>
                        <dx:GridViewDataTextColumn FieldName="AOS_ID" ReadOnly="True" VisibleIndex="1">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="CABEZOTE" VisibleIndex="8">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="TRAILER" VisibleIndex="9">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="NUMERO FACTURA" FieldName="numeroFactura" 
                            VisibleIndex="3">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataHyperLinkColumn Caption="Reporte" ToolTip="Latitud - Logitud" VisibleIndex="2"
                            Width="80px" FieldName="AMA_PLACA">
                            <DataItemTemplate>
                                <dx:ASPxButton ID="ASPxButton1" runat="server" CommandName="cmdReporte" Text="Ubicar">
                                </dx:ASPxButton>
                            </DataItemTemplate>
                        </dx:GridViewDataHyperLinkColumn>
                        <dx:GridViewDataTextColumn FieldName="AOS_ESTADO" VisibleIndex="10" 
                            Caption="ESTADO">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="FECHA SOLICITUD" FieldName="AOS_FECHA_SOLICITUD"
                            VisibleIndex="11">
                            <PropertiesTextEdit DisplayFormatString="d">
                            </PropertiesTextEdit>
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="FECHA ASIGNACION" FieldName="AOS_FECHA_ASIGNACION"
                            VisibleIndex="12">
                            <PropertiesTextEdit DisplayFormatString="d">
                            </PropertiesTextEdit>
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="FECHA ENTREGA" FieldName="AOS_FECHA_ENTREGA"
                            VisibleIndex="13">
                            <PropertiesTextEdit DisplayFormatString="d">
                            </PropertiesTextEdit>
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="NUMERO REMESA" FieldName="remesa" 
                            VisibleIndex="7">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="CLIENTE" FieldName="AVI_CLIENTE" 
                            VisibleIndex="4">
                        </dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="remesaRemesa" ShowInCustomizationForm="True" Caption="REMESA" 
                            VisibleIndex="5"></dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="CONDUCTOR" FieldName="APE_NOMBRE" 
                            ShowInCustomizationForm="True" VisibleIndex="6">
                        </dx:GridViewDataTextColumn>
                    </Columns>
                    <Settings ShowFilterRow="True" ShowFilterRowMenu="True" />
                </dx:ASPxGridView>
            </td>
        </tr>
    </table>
</asp:Content>
